/*
 * @Description:
 * @Author: YWJ
 * @Date: 2025-02-03 16:34:39
 * @LastEditors: YWJ
 */
import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
import Router from "./router";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/es/locale/lang/zh-cn";

Router.beforeEach((to, from, next) => {
  if (!window.history.state.current) window.history.state.current = to.fullPath;
  if (!window.history.state.back) window.history.state.back = from.fullPath;
  // 手动修改history的state
  return next();
});

createApp(App)
  .use(Router)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount("#app");
